﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Microsoft.Practices.Unity;

namespace Skynet.C2SModule.Views.BookReader
{
    /// <summary>
    /// Interaction logic for BookReaderView.xaml
    /// </summary>
    public partial class BookReaderView : UserControl, IBookReaderView
    {
        private Presenters.BookReader.BookReaderPresenter _Presenter;
        [Dependency]
        public Presenters.BookReader.BookReaderPresenter Presenter
        {
            get { return _Presenter; }
            set { _Presenter = value;
                _Presenter.View = this;
                this.DataContext = value;
            }
        }        
        public BookReaderView()
        {
            InitializeComponent();
        }

        private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            this.Presenter.OnViewReady();
        }

        private void btnSave_Click(object sender, RoutedEventArgs e)
        {
            var elip  =  new Ellipse(){  Width=10, Height = 10, Fill= Brushes.Black};
            var con = new InlineUIContainer(elip, this.fdReader.Selection.End);             
        }

        private void btnInsertNote_Click(object sender, RoutedEventArgs e)
        {           
           
            
        }
    }
}
